package org.jsrml.core.base.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.FetchType;
import javax.persistence.ForeignKey;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;


/**
 * 地址
 * 
 * @author 张剑
 */
@Embeddable
public class EmAddress {

/*	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "COUNTRY_ID",foreignKey = @ForeignKey(name = "none"))
	private Country country;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PROVINCE_ID",foreignKey = @ForeignKey(name = "none"))
	private Province province;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CITY_ID",foreignKey = @ForeignKey(name = "none"))
	private City city;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AREA_ID",foreignKey = @ForeignKey(name = "none"))
	private Area area;*/
	
	@Column(name = "PROVINCE", length = 256)
	private String province;
	
	@Column(name = "CITY", length = 256)
	private String city;
	
	@Column(name = "AREA", length = 256)
	private String area;
	
	@Column(name = "DETAIL", length = 512)
	private String detail;

	@Column(name = "ZIPCODE", length = 16)
	private String zipCode;

	@Column(name = "LONGITUDE", columnDefinition = M.COORDINATE_COLUMN)
	private Double longitude;

	@Column(name = "LATITUDE", columnDefinition = M.COORDINATE_COLUMN)
	private Double latitude;

	public EmAddress() {

	}

/*	public EmAddress(Boolean initAll) {
		province = new Province();
		city = new City();
		area = new Area();
	}

	public Country getCountry() {
		return country;
	}

	public void setCountry(Country country) {
		this.country = country;
	}

	public Province getProvince() {
		return province;
	}

	public void setProvince(Province province) {
		this.province = province;
	}

	public City getCity() {
		return city;
	}

	public void setCity(City city) {
		this.city = city;
	}

	public Area getArea() {
		return area;
	}

	public void setArea(Area area) {
		this.area = area;
	}*/

	public String getDetail() {
		return detail;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

}
